package Aleehot100;

/**
 * ClassName: c096
 * Package: Aleehot100
 * Description:136. 只出现一次的数字
 *
 * @Author BCXJ
 * @Create 2025/9/16 07:21
 * @Version 1.0
 * @Since 1.0
 */
public class c096 {
    public static void main(String[] args) {

    }

    public static int singleNumber(int[] nums) {
        if (null == nums || nums.length == 0) return 0;
        int res = nums[0];
        for (int i = 1; i < nums.length; i++) {
            res = res ^ nums[i];
        }
        return res;
    }

}
